import { Image, StyleSheet, type ImageSourcePropType } from "react-native";

type Props = {
  imgSource: ImageSourcePropType;
  selectImage?: string;
};

export default function ImageViewer({ imgSource, selectImage }: Props) {
  const imageSource = selectImage ? { uri: selectImage } : imgSource;
  return <Image source={imageSource} style={styles.image} />;
}

const styles = StyleSheet.create({
    image:{
        width: 320,
        height: 440,
        borderRadius: 18
    }
})

